libname md35R 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3.5\analysis\motind35R'; *this is study motind35R but that libname is too long;

libname ind35R 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3.5\analysis\independents\ind35R';
libname dem35R 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3.5\analysis\democrats\dem35R';
libname rep35R 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3.5\analysis\republicans\rep35R';

data md35R.all; set ind35R.all dem35R.all rep35R.all; run;

proc freq data=md35R.all; table partyid forcedparty; run;
proc freq data=ind35R.all; table partyid forcedparty; run;
proc freq data=dem35R.all; table partyid forcedparty; run;
proc freq data=rep35R.all; table partyid forcedparty; run;


**********************************CLEANING DATA**************************************;

*coding edu as continuous;
data md35R.all; set md35R.all;
format education 1.;
if edu = 1 then education = 1; *elementary school;
else if edu = 2 then education = 2; *junior high;
else if edu = 3 then education = 3; *some high school;
else if edu = 4 then education = 4; *high school graduate;
else if edu in (5,6) then education = 5; *some college and associate's degree;
else if edu = 7 then education = 6; *bachelor's degree;
else if edu in (8,9,14) then education = 7; *some graduate school, master's degree, MBA;
else if edu in (10,11,13) then education = 8; *JD, MD, other advanced degree;
else if edu = 12 then education = 9; run; *PhD;

proc freq data=md35R.all; table citizen; run;

*getting rid of non-US citizens - asked for this, but didn't get it;
data md35R.all; set md35R.all; 
if citizen NE "us" then delete; run;
*71 subjects deleted;

TITLE 'Completers vs Noncompleters';
ODS HTML BODY = 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3.5\analysis\motind35R\Completers vs Noncompleters.html';
data md35R.all; set md35R.all; 
if consented = . then delete; 
if debriefed = . then debriefed = 0; run;
proc ttest data=md35R.all; class debriefed; var age edu; run;
proc freq data=md35R.all; 
tables gender*debriefed  / chisq ; run;

ODS HTML CLOSE;
*81 deleted for not consenting;

*getting rid of people who did not complete the 2 main DVs;
data md35R.all; set md35R.all; 
if planiat = . then delete; 
if planprefer = . then delete; run;
*701 subjects deleted;

*recoding variables;
data md35R.all; set md35R.all; 
socialpolitics = .;
if socpolitics = 1 then socialpolitics = 3; 
else if socpolitics = 2 then socialpolitics = 2; 
else if socpolitics = 3 then socialpolitics = 1; 
else if socpolitics = 4 then socialpolitics = 0; 
else if socpolitics = 5 then socialpolitics = -1; 
else if socpolitics = 6 then socialpolitics = -2; 
else if socpolitics = 7 then socialpolitics = -3; run;

data md35R.all; set md35R.all; 
economicpolitics = .;
if econpolitics = 1 then economicpolitics = 3; 
else if econpolitics = 2 then economicpolitics = 2; 
else if econpolitics = 3 then economicpolitics = 1; 
else if econpolitics = 4 then economicpolitics = 0; 
else if econpolitics = 5 then economicpolitics = -1; 
else if econpolitics = 6 then economicpolitics = -2; 
else if econpolitics = 7 then economicpolitics = -3; run;

data md35R.all; set md35R.all; 
partyforce = .;
if forcedparty = 1 then partyforce = -3; 
else if forcedparty = 2 then partyforce = -2; 
else if forcedparty = 3 then partyforce = -1; 
else if forcedparty = 4 then partyforce = 0; 
else if forcedparty = 5 then partyforce = 1; 
else if forcedparty = 6 then partyforce = 2; 
else if forcedparty = 7 then partyforce = 3; run;

data md35R.all; set md35R.all; 
informat majorparty $3.;
majorparty = "."; 
if partyid = 1 then majorparty = "Dem"; 
else if partyid = 2 then majorparty = "Rep"; 
else if partyid = 3 then majorparty = "Ind"; run;

data md35R.all; set md35R.all; 
informat indforce $9.;
indforce = "."; 
if partyforce in (1,2,3) then indforce = "DemInd"; 
else if partyforce = 0 then indforce = "StrongInd"; 
else if partyforce in (-1,-2,-3) then indforce = "RepInd"; run;

data md35R.all; set md35R.all; 
detailsinfluenced = howdetails; run;

data md35R.all; set md35R.all; 
prefermain = .;
if planprefer = 1 then prefermain = -3; 
else if planprefer = 2 then prefermain = -2; 
else if planprefer = 3 then prefermain = -1; 
else if planprefer = 4 then prefermain = 0; 
else if planprefer = 5 then prefermain = 1; 
else if planprefer = 6 then prefermain = 2; 
else if planprefer = 7 then prefermain = 3; run;

proc means data=md35R.all; var prefermain planprefer; run;
proc corr data=md35R.all; var prefermain planprefer; run;

data md35R.all; set md35R.all; 
poliat = 0 - politicsiat; run;

data md35R.all; set md35R.all; 
informat poliatbin $19.;
poliatbin = "."; 
if poliat > .15 then poliatbin = "Implicit Democrat";
else if poliat < -.15 then poliatbin = "Implicit Republican"; run;

data md35R.all; set md35R.all; 
informat recallright $5.;
informat recallfirst $5.; 

if cogloadmanip = "load" then do;

recallright = "fail"; 
if recall = 6914954 then recallright = "pass"; 
else if recall = . then recallright = "blank"; 

recallfirst = "fail"; 
if reportearly = 6914954 then recallfirst = "pass";  
else if reportearly = . then recallfirst = "blank"; end; run;

proc sort data=md35R.all; by cogloadmanip; 
proc freq data=md35R.all ; by cogloadmanip; tables recall reportearly; run;
proc freq data=md35R.all ; by cogloadmanip; table recallright recallfirst; run;

proc contents data=md35R.all; run;

data md35R.all; set md35R.all; 
conditionnum = .; 
if condition = "dem" then conditionnum = .5; 
else if condition = "rep" then conditionnum = -.5; run;

data md35R.all; set md35R.all; 
if partyinfluenced = 1 then aware = -.5; 
else if partyinfluenced in (2,3,4,5) then aware = .5; run;

data md35R.all; set md35R.all; 
if cogloadmanip = "control" then cogloadnum = -.5; 
else if cogloadmanip = "load" then cogloadnum = .5; run;


************************************************************************
CLEAN DATASET INCLUDES XXX who:
only us citizens 
only people who completed both 2 DVs 

RETAINED PEOPLE who:
failed the IMC
************************************************************************;

**********************************Sample Characteristics**************************************;

TITLE 'Combined Sample Characteristics';
ODS HTML BODY = 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3.5\analysis\motind35R\Combined Sample Characteristics.html';

proc freq data=md35R.all;
tables gender racecen ethniccen citizen partyid; run;

proc univariate data=md35R.all; var education edu; run;
proc freq data=md35R.all; table education edu; run;

proc means data=md35R.all; 
var relID socialpolitics economicpolitics poliat age; run;

proc sort data=md35R.all; by majorparty;

proc freq data=md35R.all; by majorparty; 
tables gender racecen ethniccen citizen partyid edu; run;

proc means data=md35R.all; by majorparty;
var relID socialpolitics economicpolitics poliat age; run;

ODS HTML CLOSE;


**************analysis with manipulation check failures removed on different datasets****************;

TITLE 'Main Analysis with Study Manip Check Failures Removed';
ODS HTML BODY = 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3.5\analysis\motind35R\Main Analysis with Study Manip Check Failures Removed.html';

data md35R.manip; set md35R.all; run;

data md35R.manip; set md35R.manip; 
if condition = "rep" AND manip1 = 2 then delete; run;  *129;

data md35R.manip; set md35R.manip; 
if condition = "dem" AND manip1 = 1 then delete; run; *132;

data md35R.manip; set md35R.manip; 
if manip2 = 1 then delete; run; *65;

*in the paper, i report the percentage of people who failed the study specific manipulation checks
as the sum of the people above divided by 992, which is the number of people who completed manipchecks 1 and 2 - no manipcheck3 in this study;

proc sort data=md35R.manip; by majorparty; 

proc ttest data=md35R.manip; by majorparty; 
class condition; var prefermain planiat; run;

proc glm data=md35R.manip (where=(majorparty="Ind")); 
class condition;
model prefermain=condition|poliat; run;

proc glm data=md35R.manip (where=(majorparty="Ind")); 
class condition;
model planiat=condition|poliat; run;

proc glm data=md35R.manip (where=(indforce="StrongInd")); 
class condition;
model prefermain=condition|poliat; run;

proc glm data=md35R.manip (where=(indforce="StrongInd")); 
class condition;
model planiat=condition|poliat; run;

proc sort data=md35R.manip; by majorparty; 

proc means data=md35R.manip ; by majorparty; 
class poliatbin condition; 
var planiat prefermain; run;

ODS HTML CLOSE;


TITLE 'Main Analysis with IMC Failures Removed';
ODS HTML BODY = 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3.5\analysis\motind35R\Main Analysis with IMC Failures Removed.html';

data md35R.IMC; set md35R.all;
if IMC = 0 then delete; run;
*deleted 628;

proc freq data=md35R.IMC; table IMC; run; 

proc sort data=md35R.IMC; by majorparty; 

proc ttest data=md35R.IMC; by majorparty; 
class condition; var prefermain planiat; run;

proc glm data=md35R.IMC (where=(majorparty="Ind")); 
class condition;
model prefermain=condition|poliat; run;

proc glm data=md35R.IMC (where=(majorparty="Ind")); 
class condition;
model planiat=condition|poliat; run;

proc glm data=md35R.IMC (where=(indforce="StrongInd")); 
class condition;
model prefermain=condition|poliat; run;

proc glm data=md35R.IMC (where=(indforce="StrongInd")); 
class condition;
model planiat=condition|poliat; run;

proc sort data=md35R.IMC; by majorparty; 

proc means data=md35R.IMC ; by majorparty; 
class poliatbin condition; 
var planiat prefermain; run;

ODS HTML CLOSE;


*************manipulation checks****************;

TITLE 'Manip Checks';
ODS HTML BODY = 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3.5\analysis\motind35R\Manip Checks.html';

proc freq data=md35R.all; tables IMC; run;

proc sort data=md35R.all; by condition;
proc freq data=md35R.all; by condition;
tables manip1; run; 

proc freq data=md35R.all; table manip2; run;

ODS HTML CLOSE;


*************************making new datasets to analyze data easily*********************;
data md35R.ind; set md35R.all; 
keep = 0; 
if majorparty = "Ind" then keep = 1; 
if keep = 0 then delete; run;

data md35R.strong; set md35R.ind; 
keep = 0; 
if partyforce = 0 then keep = 1; 
if keep = 0 then delete; run;

data md35R.rep; set md35R.all; 
keep = 0; 
if majorparty = "Rep" then keep = 1; 
if keep = 0 then delete; run;

data md35R.dem; set md35R.all; 
keep = 0; 
if majorparty = "Dem" then keep = 1; 
if keep = 0 then delete; run;


**********************************ANALYZING DATA**************************************;

TITLE 'Combined Sample Analysis';
ODS HTML BODY = 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3.5\analysis\motind35R\Combined Analysis.html';

proc means n mean std data=md35R.all; 
var prefermain planiat priorpref; run;

proc means n mean std data=md35R.all (where=(majorparty NE ".")); class majorparty;
var prefermain planiat priorpref; run;

proc sort data=md35R.all; by majorparty; 
proc corr data=md35R.all;  by majorparty; var planiat prefermain; run;

proc means n mean std data=md35R.all;
var partyinfluenced socialinfluenced detailsinfluenced ; run;

proc means n mean std data=md35R.all (where=(majorparty NE ".")); class majorparty;
var partyinfluenced socialinfluenced detailsinfluenced ; run;

proc sort data=md35R.all; by majorparty;

proc freq data=md35R.all (where=(majorparty NE ".")); by majorparty;
tables partyinfluenced detailsinfluenced; run;

proc corr data=md35R.all; 
var planiat prefermain socialpolitics poliat economicpolitics politics; run;

*testing hypotheses on reasoning;
proc glm data=md35R.all (where=(majorparty NE ".")); class majorparty; 
model partyinfluenced=majorparty; means majorparty / tukey; run;

proc sort data=md35R.all; by cogloadmanip; 
proc freq data=md35R.all ; by cogloadmanip; tables recall reportearly; run;
proc freq data=md35R.all ; by cogloadmanip; table recallright recallfirst; run;

ODS HTML CLOSE;




**********************************DEMOCRATS**************************************;

TITLE 'Democrats Analysis';
ODS HTML BODY = 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3.5\analysis\motind35R\Democrats Analysis.html';

*test of hypothesis;
proc ttest data=md35R.dem ; 
class condition; var prefermain planiat; run;

proc glm data=md35R.dem; 
class condition cogloadmanip;
model prefermain=condition|cogloadmanip; run;

proc glm data=md35R.dem; 
class condition cogloadmanip;
model planiat=condition|cogloadmanip; run;

proc means data=md35R.dem; class cogloadmanip condition; var planiat prefermain; run;

proc sort data=md35R.dem; by recallright; 
proc means data=md35R.dem; by recallright; class cogloadmanip condition; var planiat prefermain; run;

*covarying DV order;
proc glm data=md35R.dem ; class condition dvorder;
model prefermain=condition|dvorder; run;

proc glm data=md35R.dem ; class condition dvorder;
model planiat=condition|dvorder; run;

ODS HTML CLOSE;


**********************************REPUBLICANS**************************************;

TITLE 'Republicans Analysis';
ODS HTML BODY = 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3.5\analysis\motind35R\Republicans Analysis.html';

*test of hypothesis;
proc ttest data=md35R.rep ; 
class condition; var prefermain planiat; run;

proc glm data=md35R.rep; 
class condition cogloadmanip;
model prefermain=condition|cogloadmanip; run;

proc glm data=md35R.rep; 
class condition cogloadmanip;
model planiat=condition|cogloadmanip; run;

proc means data=md35R.rep; class cogloadmanip condition; var planiat prefermain; run;

*covarying DV order;
proc glm data=md35R.rep ; class condition dvorder;
model prefermain=condition|dvorder; run;

proc glm data=md35R.rep ; class condition dvorder;
model planiat=condition|dvorder; run;

ODS HTML CLOSE;


TITLE 'Rep-Dem Average Difference';
ODS HTML BODY = 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3.5\analysis\motind35R\Rep-Dem Average Difference.html';
data md35R.two; set md35R.all; 
keep = 0; 
if majorparty in ("Dem", "Rep") then keep=1; 
if keep = 0 then delete; run;

proc ttest data=md35R.two; class majorparty; var prefermain planiat; run;
ODS HTML CLOSE; 



**********************************INDEPENDENTS**************************************;

TITLE 'CIs on main analyses';
ODS HTML BODY = 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3.5\analysis\motind35R\CIs on main analyses.html';

proc glm data=md35R.ind;
model prefermain=conditionnum|poliat / CLPARM; run;

proc glm data=md35R.ind; 
model planiat=conditionnum|poliat / CLPARM; run;

proc glm data=md35R.strong; 
model prefermain=conditionnum|poliat / CLPARM; run;

proc glm data=md35R.strong; 
model planiat=conditionnum|poliat / CLPARM; run;

proc glm data=md35R.ind; 
model prefermain=conditionnum|poliat|cogloadnum / CLPARM; run;

proc glm data=md35R.ind; 
model planiat=conditionnum|poliat|cogloadnum / CLPARM; run;

proc means data=md35R.ind; class conditionnum conditionnum poliatbin; var planiat prefermain; run;

ODS HTML CLOSE; 



TITLE 'Independents - IAT incremental validity WITH CIs';
ODS HTML BODY = 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3.5\analysis\motind35R\Independents - IAT incremental validity WITH CIs.html';

proc glm data=md35R.ind; 
model prefermain=conditionnum partyinfluenced partyforce / CLPARM ; run;

proc glm data=md35R.ind; 
model prefermain=conditionnum partyinfluenced partyforce poliat / CLPARM ; run;

proc glm data=md35R.ind; 
model prefermain=conditionnum partyinfluenced partyforce poliat
partyinfluenced*conditionnum partyforce*conditionnum / CLPARM ; run;

proc glm data=md35R.ind; 
model prefermain=conditionnum partyinfluenced partyforce poliat
partyinfluenced*conditionnum partyforce*conditionnum poliat*conditionnum / CLPARM ; run;

proc glm data=md35R.ind; 
model planiat=conditionnum partyinfluenced partyforce / CLPARM ; run;

proc glm data=md35R.ind; 
model planiat=conditionnum partyinfluenced partyforce poliat / CLPARM ; run;

proc glm data=md35R.ind; 
model planiat=conditionnum partyinfluenced partyforce poliat
partyinfluenced*conditionnum partyforce*conditionnum / CLPARM ; run;

proc glm data=md35R.ind; 
model planiat=conditionnum partyinfluenced partyforce poliat
partyinfluenced*conditionnum partyforce*conditionnum poliat*conditionnum / CLPARM ; run;

ODS HTML CLOSE;


TITLE 'Independents - IAT incremental validity WITH CIs WITH political ideology';
ODS HTML BODY = 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3.5\analysis\motind35R\Independents - IAT incremental validity WITH CIs WITH political ideology.html';

proc glm data=md35R.ind; 
model prefermain=conditionnum partyinfluenced partyforce politics / CLPARM ; run;

proc glm data=md35R.ind; 
model prefermain=conditionnum partyinfluenced partyforce politics poliat / CLPARM ; run;

proc glm data=md35R.ind; 
model prefermain=conditionnum partyinfluenced partyforce politics poliat
partyinfluenced*conditionnum partyforce*conditionnum politics*conditionnum / CLPARM ; run;

proc glm data=md35R.ind; 
model prefermain=conditionnum partyinfluenced partyforce politics poliat
partyinfluenced*conditionnum partyforce*conditionnum politics*conditionnum poliat*conditionnum / CLPARM ; run;

proc glm data=md35R.ind; 
model planiat=conditionnum partyinfluenced partyforce politics / CLPARM ; run;

proc glm data=md35R.ind; 
model planiat=conditionnum partyinfluenced partyforce politics poliat / CLPARM ; run;

proc glm data=md35R.ind; 
model planiat=conditionnum partyinfluenced partyforce politics poliat
partyinfluenced*conditionnum partyforce*conditionnum politics*conditionnum / CLPARM ; run;

proc glm data=md35R.ind; 
model planiat=conditionnum partyinfluenced partyforce politics poliat
partyinfluenced*conditionnum partyforce*conditionnum politics*conditionnum poliat*conditionnum / CLPARM ; run;

ODS HTML CLOSE;



TITLE 'Full Sample - IAT incremental validity';
ODS HTML BODY = 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3.5\analysis\motind35R\Full Sample - IAT incremental validity.html';

data md35R.major; set md35R.all; 
keep = 0; 
if majorparty in ("Dem", "Rep", "Ind") then keep=1; 
if keep = 0 then delete; run;

data md35R.major; set md35R.major; 
informat newparty 1.; 
newparty = .; 
if majorparty = "Rep" then newparty = -2; 

if majorparty = "Ind" then do; 
if indforce = "RepInd" then newparty = -1; 
else if indforce = "StrongInd" then newparty = 0; 
else if indforce = "DemInd" then newparty = 1; end; 

else if majorparty = "Dem" then newparty = 2; run;

proc freq data=md35R.major; table newparty; run;
proc sort data=md35R.major; by newparty; 
proc freq data=md35R.major; by newparty; 
tables majorparty indforce; run;

proc glm data=md35R.major; 
model prefermain=conditionnum partyinfluenced newparty; run;

proc glm data=md35R.major; 
model prefermain=conditionnum partyinfluenced newparty poliat; run;

proc glm data=md35R.major; 
model prefermain=conditionnum partyinfluenced newparty poliat
partyinfluenced*conditionnum newparty*conditionnum; run;

proc glm data=md35R.major; 
model prefermain=conditionnum partyinfluenced newparty poliat
partyinfluenced*conditionnum newparty*conditionnum poliat*conditionnum; run;

proc glm data=md35R.major; 
model planiat=conditionnum partyinfluenced newparty; run;

proc glm data=md35R.major; 
model planiat=conditionnum partyinfluenced newparty poliat; run;

proc glm data=md35R.major; 
model planiat=conditionnum partyinfluenced newparty poliat
partyinfluenced*conditionnum newparty*conditionnum; run;

proc glm data=md35R.major; 
model planiat=conditionnum partyinfluenced newparty poliat
partyinfluenced*conditionnum newparty*conditionnum poliat*conditionnum; run;

ODS HTML CLOSE; 



TITLE 'Awareness';
ODS HTML BODY = 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3.5\analysis\motind35R\Awareness.html';

proc sort data=md35R.all; by majorparty; 
proc means data=md35R.all n mean std; by majorparty; class condition aware; var prefermain planiat; run;

proc glm data=md35R.ind; 
model prefermain=conditionnum|poliat|partyinfluenced / CLPARM; run;

proc glm data=md35R.ind; 
model planiat=conditionnum|poliat|partyinfluenced / CLPARM; run;

proc glm data=md35R.ind; 
model prefermain=conditionnum|poliat|aware / CLPARM; run;

proc glm data=md35R.ind; 
model planiat=conditionnum|poliat|aware / CLPARM; run;

proc glm data=md35R.dem; 
model prefermain=conditionnum|poliat|partyinfluenced / CLPARM; run;

proc glm data=md35R.dem; 
model planiat=conditionnum|poliat|partyinfluenced / CLPARM; run;

proc glm data=md35R.dem; 
model prefermain=conditionnum|poliat|aware / CLPARM; run;

proc glm data=md35R.dem; 
model planiat=conditionnum|poliat|aware / CLPARM; run;

proc glm data=md35R.rep; 
model prefermain=conditionnum|poliat|partyinfluenced / CLPARM; run;

proc glm data=md35R.rep; 
model planiat=conditionnum|poliat|partyinfluenced / CLPARM; run;

proc glm data=md35R.rep; 
model prefermain=conditionnum|poliat|aware / CLPARM; run;

proc glm data=md35R.rep; 
model planiat=conditionnum|poliat|aware / CLPARM; run;

ODS HTML CLOSE; 



*****ADD SCRIPT FOR GRAPHS*****;

*reverse coding implicit party identity for graphing only - now ID with democrats is negative so that it is on the left for graphing purposes;
data md35R.ind; set md35R.ind; 
poliat_reverse = 0-poliat; run;
proc corr data=md35R.ind; var poliat poliat_reverse; run;
proc means data=md35R.ind; var poliat poliat_reverse prefermain planiat; run;


ods listing close;
goptions reset=all device=SASEMF hsize=4.7in vsize=3.5in gsfmode=replace gsfname=grafout ftext=ariel ;
ods rtf file='C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3.5\analysis\motind35R\study 2 graphs.rtf' startpage=never;

AXIS1 LABEL=(ANGLE=90 ROTATE=0 h=9pt "Explicit Preference for Mainstream Plan") MINOR=(n=1) order=-3.6 to 4.10 by 1.5 value=(h=9pt);
AXIS2 LABEL=(h=2pt "  ") minor=none order=-1.05 to .85 by .3 value=(h=9pt);
legend1 label=none shape=line(20pt) mode=share position=(top right inside) across=1 
value=( h=9pt j=l "Democrats Proposed Mainstream Plan" "Republicans Proposed Mainstream Plan");
SYMBOL1 INTERPOL=R C=black line=1 mode=include w=3;
SYMBOL2 INTERPOL=R C=black line=2 mode=include w=3; 
PROC GPLOT DATA=md35R.ind ; 
	PLOT	prefermain*poliat_reverse=condition / vaxis=axis1 haxis=axis2 legend=legend1 noframe ; RUN;quit;

goptions reset=all device=pdf hsize=4.7in vsize=3.5in gsfmode=replace gsfname=grafout ftext=ariel;
AXIS1 LABEL=(ANGLE=90 ROTATE=0 h=9pt "Implicit Preference for Mainstream Plan") MINOR=(n=1) order=-.60 to .95 by .35 value=(h=9pt);
AXIS2 LABEL=(h=9pt "Implicitly Democratic                 Implicitly Republican") minor=none order=-1.05 to .85 by .3 value=(h=9pt);
SYMBOL1 INTERPOL=R C=black line=1 mode=include w=3;
SYMBOL2 INTERPOL=R C=black line=2 mode=include w=3; 
PROC GPLOT DATA=md35R.ind ; 
	PLOT	planiat*poliat_reverse=condition / vaxis=axis1 haxis=axis2 nolegend noframe ; RUN;quit;

ods rtf close; 
ods listing;



ods listing close;
goptions reset=all device=pdf hsize=4.6in vsize=3in gsfmode=replace gsfname=grafout HORIGIN=1 vorigin=7 ftext=ariel ;
ods pdf file='C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3.5\analysis\motind35R\study 2 graphs.pdf' startpage=never;

AXIS1 LABEL=(ANGLE=90 ROTATE=0 h=9pt "Explicit Preference for Mainstream Plan") MINOR=(n=1) order=-3.5 to 4.10 by 1.75 value=(h=9pt);
AXIS2 LABEL=(h=2pt "  ") minor=none order=-1 to .85 by .25 value=(h=9pt);
legend1 label=none shape=line(20pt) mode=share position=(top right inside) across=1 
value=( h=9pt j=l "Democrats Proposed Mainstream Plan" "Republicans Proposed Mainstream Plan");
SYMBOL1 INTERPOL=R C=black line=1 mode=include w=3;
SYMBOL2 INTERPOL=R C=black line=2 mode=include w=3; 
PROC GPLOT DATA=md35R.ind ; 
	PLOT	prefermain*poliat_reverse=condition / vaxis=axis1 haxis=axis2 legend=legend1 noframe ; RUN;quit;

goptions reset=all device=pdf hsize=4.6in vsize=3in gsfmode=replace gsfname=grafout HORIGIN=1 vorigin=4 ftext=ariel;
AXIS1 LABEL=(ANGLE=90 ROTATE=0 h=9pt "Implicit Preference for Mainstream Plan") MINOR=(n=1) order=-.60 to .95 by .3 value=(h=9pt);
AXIS2 LABEL=(h=9pt "Implicitly Democratic                 Implicitly Republican") minor=none order=-1 to .85 by .25 value=(h=9pt);
SYMBOL1 INTERPOL=R C=black line=1 mode=include w=3;
SYMBOL2 INTERPOL=R C=black line=2 mode=include w=3; 
PROC GPLOT DATA=md35R.ind ; 
	PLOT	planiat*poliat_reverse=condition / vaxis=axis1 haxis=axis2 nolegend noframe ; RUN;quit;


ods pdf close;
ods listing;




*removing selected demographics that could possibly be identifying for posting data;

data md35R.post; set md35R.all; 
drop byear bmonth dayofbirth characteristic genoccupation major reldenom  relfamily religion work  zip; run;
